package com.you.pattern.listener.demo1;

public class Main {

    public static void main(String[] args) {
        EventSourceObject eventSourceObject = new EventSourceObject(); //定义一个事件源
        //注册监听器
        eventSourceObject.addCusListener(new CusEventListener() {
            @Override
            public void fireCusEvent(CusEvent cusEvent) {
                super.fireCusEvent(cusEvent);
            }
        });
        //触发事件
        eventSourceObject.changeName("tomcat");
    }
}
